import request from '@/utils/request'

// 查询业务区域管理列表
export function listBusinessArea(query) {
  return request({
    url: '/system/businessArea/list',
    method: 'get',
    params: query
  })
}

// 查询业务区域管理详细
export function getBusinessArea(areaId) {
  return request({
    url: '/system/businessArea/' + areaId,
    method: 'get'
  })
}

// 新增业务区域管理
export function addBusinessArea(data) {
  return request({
    url: '/system/businessArea',
    method: 'post',
    data: data
  })
}

// 修改业务区域管理
export function updateBusinessArea(data) {
  return request({
    url: '/system/businessArea',
    method: 'put',
    data: data
  })
}

// 删除业务区域管理
export function delBusinessArea(areaId) {
  return request({
    url: '/system/businessArea/' + areaId,
    method: 'delete'
  })
}

// 查询业务区域管理是否存在
export function getValidatedArea(data) {
  return request({
    url: '/system/businessArea/validatedArea',
    data: data
  })
}
